package br.com.localfloripa.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="tp_pessoa", discriminatorType=DiscriminatorType.CHAR)
@DiscriminatorValue(value="F")
@Table(name="pessoa")
public abstract class Pessoa implements Serializable {
	
	private static final long serialVersionUID = 7973418204315176425L;
	
	@SequenceGenerator(name="Pessoa_Seq",sequenceName="pessoa_seq")
	@Id @GeneratedValue(generator="Pessoa_Seq")
	private Long id;
	@Column(name="nome",nullable=false)
	private String nome;
	
	public Pessoa() {
		
	}
	public String getNome() {
		return nome;
	}
	public void setNome(String nome) {
		this.nome = nome;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	

}
